<!DOCTYPE html>
<html lang="zh">
<head>
    <meta charset="utf-8">
    <title>用户管理中心</title>
    <meta name="renderer" content="webkit">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=0">
    <link rel="stylesheet" href="__LAYUI__/css/layui.css" media="all">
    <style>
	    *{font-weight: 300;}

	    main {padding: 15px;background-color: #ffffff;}
        main > blockquote {vertical-align: middle;overflow: hidden;color: #666;line-height: 60px;}
        main > blockquote > div > .layui-icon {font-size: 60px;color: #666;line-height: 60px;}

        .qunlist {background-color: #fff;}
        .qunlist > .layui-row .item{background-color: #fff;border-radius: 2px;padding: 5px;border: 1px solid #e6e6e6;}
        .qunlist > .layui-row .item img {max-width: 100%;}
    </style>
</head>

<body>

<main>

    <blockquote class="layui-elem-quote layui-quote-nm">
        <div style="float: left;"><i class="layui-icon layui-icon-username"></i></div>
	    <div style="float: left;line-height: 30px;padding: 3px 3px 3px 10px;">
		    用户名：{$user.username}
		    <a class="logout" style="color: red;font-size: 80%;margin-left: 10px;" href="javascript:;">安全退出</a>
		    <br>
		    到期日期：{:date('Y-m-d', $user.end_time)}
	    </div>
    </blockquote>

	<div class="layui-btn-container" style="margin: 10px 0;">
		<a href="{:url('user/index/create')}" class="layui-btn layui-btn-danger"><i class="layui-icon layui-icon-add-1"></i>添加项目</a>
		<a href="{:url('user/index/shareinfo')}" class="layui-btn layui-bg-blue"><i class="layui-icon layui-icon-share"></i>设置</a>
		{if $user.admin == 3}
		<a href="{:url('user/user/index')}" class="layui-btn layui-bg-blue"><i class="layui-icon layui-icon-user"></i>用户</a>
		{/if}
	</div>

    <div style="margin: 10px 0;">

    </div>

    <div class="qunlist">

        <table class="layui-hide" id="dataTable" lay-filter="dataTable"></table>

        <script type="text/html" id="status">
            {{ d.status==1 ? '已启用' : '<span style="color: orange;">已禁用</span>' }}
        </script>

        <script type="text/html" id="img">
            <img onclick="showImg(this.src);" src="{{ d.img }}" style="max-width: 100%;" alt="">
        </script>

        <script type="text/html" id="barDemo">
            <a style="margin-right: 10px;color: #f52;" href="/user/index/edit?id={{d.id}}" lay-event="edit">修改</a>
<!--            <a style="margin-right: 10px;color: #1E9FFF;" href="javascript:;" lay-event="del" data-table="quns">删除</a>-->
            <a style="margin-right: 10px;color: #1E9FFF;" href="{:fission('https')}://{{d.domain}}/awip/{{ d.alias }}.html" target="_blank">打开</a>
            <a style="margin-right: 10px;color: #1E9FFF;" href="javascript:;" onclick="showImg('qrcode?url={:fission(\'https\')}://{{d.domain}}/awip/{{ d.alias }}.html')">二维码</a>
            <a style="margin-right: 10px;color: #1E9FFF;" href="javascript:;" onclick="layer.alert('{:fission(\'https\')}://{{d.domain}}/awip/{{ d.alias }}.html', {title: false,shade: 0.5,closeBtn: 1,shadeClose: true,anim: 3,btn:false});">网址</a>

            <div class="layui-btn-group" style="display: none;">
                <a class="layui-btn layui-btn-sm layui-btn-primary" lay-event="edit"><i class="layui-icon layui-icon-edit"></i>修改</a>
                <a class="layui-btn layui-btn-sm layui-btn-primary" lay-event="del" data-table="quns"><i class="layui-icon layui-icon-delete"></i>删除</a>
            </div>
        </script>

    </div>
</main>

<script src="__LAYUI__/layui.js"></script>
<script src="__STATIC__/js/public.js"></script>
<script>
    layui.use(['table', 'layer', 'form'], function() {
        var table = layui.table, layer = layui.layer, form = layui.form, $ = layui.jquery;

        table.render({
            elem: '#dataTable',
            url: "{:url()}",
            title: '数据表',
            size: 'lg',
            skin: 'line',
            limit: 20,
            cols: [
                [
                    {field: 'left',		title:'操作',		width:210,		align:'center',		toolbar:'#barDemo'},
                    {field: 'title',	title:'群标题',		minWidth:200},
                    {field: 'vpic',		title:'图片',		width:120,		align:'center',		templet:'#img'},
                    {field: 'view',		title:'访问量',		width:100,		align:'center'},
                ]
            ],
            page: true
        });

    });
</script>

</body>
</html>